<%-- 
    Document   : projectList
    Created on : 28.4.2009, 19:26:35
    Author     : Ediczech
--%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<h2><h:outputText value="#{msg.projectList_title}"/></h2>

<h:panelGroup rendered="#{ApplicationBean.isDeveloper}">
    <h:form>
        <rich:dataList var="project" value="#{ProjectListBean.ownedProjects}" type="none">
            <h:outputLink value="/bugman-war/faces/projectBugs.jsp?id=#{project.id}">
                <h:outputText value="#{project.name}"/>
            </h:outputLink>
            <rich:spacer/>
            <h:outputLink value="/bugman-war/faces/editProject.jsp?id=#{project.id}" styleClass="note">
                <h:outputText value="(#{msg.projectList_edit})"/>
            </h:outputLink>
        </rich:dataList>
    </h:form>
    <hr/>
    <h:form>
        <rich:dataList var="project" value="#{ProjectListBean.otherProjects}" type="none">
            <h:outputLink value="/bugman-war/faces/projectBugs.jsp?id=#{project.id}">
                <h:outputText value="#{project.name}"/>
            </h:outputLink><br/>
        </rich:dataList>
    </h:form>
</h:panelGroup>

<h:panelGroup rendered="#{!ApplicationBean.isDeveloper}">
    <h:form>
        <rich:dataList var="project" value="#{ProjectListBean.projects}" type="none">
            <h:outputLink value="/bugman-war/faces/projectBugs.jsp?id=#{project.id}">
                <h:outputText value="#{project.name}"/>
            </h:outputLink><br/>
        </rich:dataList>
    </h:form>
</h:panelGroup>